import { http } from "@/utils/http";

type ResultTable = {
  success: boolean;
  data?: {
    /** 列表数据 */
    list: Array<any>;
    /** 总条目数 */
    total?: number;
    /** 每页显示条目个数 */
    pageSize?: number;
    /** 当前页数 */
    currentPage?: number;
  };
};

/** 查询 */
export const queryAuthPolicy = (data?: object) => {
  return http.request<ResultTable>("post", "/authPolicy/queryAuthPolicy", { data });
};

/**查看详情 */
export const queryAuthPolicyDetail = (data?: object) => {
  return http.request<ResultTable>("post", "/authPolicy/queryAuthPolicyDetail", { data });
};

/**新增 */
export const createAuthPolicyDetail = (data?: object) => {
  return http.request<ResultTable>("post", "/authPolicy/createAuthPolicyDetail", { data });
};

/**修改 */
export const updateAuthPolicyDetail = (data?: object) => {
  return http.request<ResultTable>("post", "/authPolicy/updateAuthPolicyDetail", { data });
};
